create language 'plpgsql';
\echo creating OMS database .............
\echo - creating OMS tables .............
\i dml/oms_tables.sql;
\echo - creating OMS foreign keys .......
\i dml/oms_foreign_keys.sql;
\echo - creating OMS sequences ..........
\i dml/oms_sequences.sql;
\echo - creating OMS packages ...........
\i setup/oms_plpgsql_schemata.sql;
\i setup/oms_plpgsql_instr.sql;
\i setup/oms_plpgsql_datatypes.sql;
\i setup/oms_plpgsql_script_runner.sql;
\i packages/oms_pck_authorisation.sql;
\i packages/oms_pck_compositionpath.sql;
\i packages/oms_pck_element.sql;
\i packages/oms_pck_exception.sql;
\i packages/oms_pck_locking.sql;
\i packages/oms_pck_meta.sql;
\i packages/oms_pck_namespacepath.sql;
\i packages/oms_pck_relation.sql;
\i packages/oms_pck_state.sql;
\i packages/oms_pck_validator.sql;
\echo - creating OMS triggers ...........
\i triggers/oms_trigger_procs.sql;
\i triggers/oms_triggers.sql;
\echo creating OMS metadata .............
\i setup/oms_createroot.sql;
\echo - running oms_meta1.sql ...........
\i setup/oms_meta1.sql;
\echo - running oms_meta2.sql ...........
\i setup/oms_meta2.sql;
\echo - running oms_meta3.sql ...........
\i setup/oms_meta3.sql;
\echo - running oms_meta4.sql ...........
\i setup/oms_meta4.sql;
\i setup/oms_version.sql;
